﻿Public Class Abstract_Attribute_Collection

    Public attributes As New ArrayList

    Public Function findAttREF(ByVal AttSTR As String) As AbstractAttribute

        For Each Att As AbstractAttribute In attributes
            If (Att.getData("field") = AttSTR) Then
                Return Att
            End If
        Next

        Dim notFound As New Exception(message:="Attribute not Found " & AttSTR)
        Throw (notFound)

    End Function

    Public Sub newAttInstance(ByVal Identifier As String, Optional ByVal Type As String = "text")

        Dim newInstance As New AbstractAttribute(Identifier, vbNull, Type)

        Me.attributes.Add(newInstance)

    End Sub

End Class
